﻿using System;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;

namespace AnyOffice.general.rms.roll_lend
{
    public partial class index1 : ModulePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable table = new RmsLendDao().SelectMyWait(base.Conn, base.User.Identity.Name);
            if (table.Rows.Count > 0)
            {
                this.rptWait.DataSource = table;
                this.rptWait.DataBind();
            }
            else
            {
                this.litWait.Text = base.ShowMessage("无待批准借阅");
            }
            DataTable table2 = new RmsLendDao().SelectMyOk(base.Conn, base.User.Identity.Name);
            if (table2.Rows.Count > 0)
            {
                this.rptOk.DataSource = table2;
                this.rptOk.DataBind();
            }
            else
            {
                this.litOk.Text = base.ShowMessage("无已批准借阅");
            }
            DataTable table3 = new RmsLendDao().SelectMyNo(base.Conn, base.User.Identity.Name);
            if (table3.Rows.Count > 0)
            {
                this.rptNo.DataSource = table3;
                this.rptNo.DataBind();
            }
            else
            {
                this.litNo.Text = base.ShowMessage("无未批准借阅");
            }
            DataTable table4 = new RmsLendDao().SelectMyReturn(base.Conn, base.User.Identity.Name);
            if (table4.Rows.Count > 0)
            {
                this.rptReturn.DataSource = table4;
                this.rptReturn.DataBind();
            }
            else
            {
                this.litReturn.Text = base.ShowMessage("无已归还借阅");
            }


        }
    }
}
